package com.xc.stock.application.assembler;

import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import com.xc.stock.domain.basic.entity.TradeAcc;
import com.xc.stock.dto.TradeAccDTO;
import com.xc.stock.utils.Beans;
import com.xc.stock.utils.SpringUtils;

/**
 * TradeAccAssembler 
 *
 * @author rplees 
 * @email rplees.i.ly@gmail.com 
 * @created 2022/08/12 
 */
@Component
@Lazy
public class TradeAccAssembler {
  public TradeAccDTO toDTO(TradeAcc e) {
    TradeAccDTO dto = Beans.mapper(e, TradeAccDTO.class);
    if(dto == null) return dto;
    fill(e, dto);
    return  dto;
  }

  protected void fill(TradeAcc e, TradeAccDTO dto) {
    if(dto == null) return;
    return;
  }

  public static TradeAccAssembler of() {
    return SpringUtils.getBean(TradeAccAssembler.class);
  }
}
